package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.WxPayUserMapper;
import com.aidex.biz.domain.WxPayUser;
import com.aidex.biz.service.WxPayUserService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 微信转账到用户零钱Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2022-10-28
 */
@Service
@Transactional(readOnly = true)
public class WxPayUserServiceImpl extends BaseServiceImpl<WxPayUserMapper, WxPayUser> implements WxPayUserService
{
    private static final Logger log = LoggerFactory.getLogger(WxPayUserServiceImpl.class);

    /**
     * 获取单条数据
     * @param wxPayUser 微信转账到用户零钱
     * @return 微信转账到用户零钱
     */
    @Override
    public WxPayUser get(WxPayUser wxPayUser)
    {
        WxPayUser dto = super.get(wxPayUser);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 微信转账到用户零钱id
     * @return 微信转账到用户零钱
     */
    @Override
    public WxPayUser get(String id)
    {
        WxPayUser dto = super.get(id);
        return dto;
    }


    /**
     * 查询微信转账到用户零钱列表
     * @param wxPayUser 微信转账到用户零钱
     * @return 微信转账到用户零钱
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<WxPayUser> findList(WxPayUser wxPayUser)
    {
        return super.findList(wxPayUser);
    }

    /**
     * 分页查询微信转账到用户零钱列表
     * @param wxPayUser 微信转账到用户零钱
     * @return 微信转账到用户零钱
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<WxPayUser> findPage(WxPayUser wxPayUser)
    {
        return super.findPage(wxPayUser);
    }

    /**
     * 保存微信转账到用户零钱
     * @param wxPayUser
     * @return 结果
     */
    @Override
    public boolean save(WxPayUser wxPayUser)
    {
        return super.save(wxPayUser);
    }


    /**
     * 删除微信转账到用户零钱信息
     * @param wxPayUser
     * @return 结果
     */
    @Override
    public boolean remove(WxPayUser wxPayUser)
    {
        return super.remove(wxPayUser);
    }

    /**
     * 批量删除微信转账到用户零钱
     * @param ids 需要删除的微信转账到用户零钱ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteWxPayUserByIds(String[] ids)
    {
        return mapper.deleteWxPayUserByIds(ids);
    }

    /**
     * 获取最大编号
     * @param wxPayUser 微信转账到用户零钱
     * @return 结果
     */
    @Override
    public int findMaxSort(WxPayUser wxPayUser)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(wxPayUser));
    }
}
